﻿@model ScmCostledgerViewModel
@{
    Layout = null;
    ViewBag.Title = "奖励/罚款台帐-列表";
}

<div class="page" style="border-top: 1px solid #b8d0d6;" layouth="1">
    @using (Html.BeginForm("SplitPage", "ScmCostLedger", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return navTabSearch(this);" }))
    {
        <input type="hidden" name="pageNum" value="1" />
        <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
        <ul class="searchBar">
            <li><span>台帐类型：</span>
                <select name="select_type">
                    <option value="">台帐类型</option>
                    <option value="false">奖励</option>
                    <option value="true">罚款</option>
                </select>
            </li>
            <li><span>标段：</span>
                <input type="text" name="iput_biaoduan" value="@(ViewBag.iput_biaoduan)" />
            </li>
            <li><span>日期：</span>
                <input type="text" name="iput_timestart" value="@(ViewBag.iput_timestart)" class="date" format="yyyy年M月" />
                <span>-</span>
                <input type="text" name="iput_timeend" value="@(ViewBag.iput_timeend)" class="date" format="yyyy年M月" />
            </li>
            <li>
                <button type="submit" class="btn btn-success btn-xs">
                    搜索</button>
            </li>
        </ul>
    }
    <div class="panelBar" style="border-top:none;">
        <ul class="toolBar">
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmCostLedger.Create", "fyjl_add_Id",
                    Url.Action("CostLedgerAdd", "ScmCostLedger"),
                    "添加",
                    new Dictionary<string, object>
                    {
                        {"class","add"},{"rel","fyjl_add"} ,{"mask","true"},{"target","dialog"},{"width","400"},{"height","400"}
                    })
            </li>
            <li>
               @Html.PermissionButton("SafetyConstruction.ScmCostLedger.Delete", "fyjl_delete_Id",
                    Url.Action("CostLedgerDelete", "ScmCostLedger", new { id = "{ids}" }),
                    "删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"},{"rel","ids"} ,{"title","确定要删除这些记录吗?"},{"target","ajaxTodo"},{"postType","string"}
                    })
            </li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmCostLedger.Edit", "fyjl_edit_Id",
                    Url.Action("CostLedgerEdit", "ScmCostLedger", new { id = "{ids}" }),
                    "修改",
                    new Dictionary<string, object>
                    {
                        {"class","edit"},{"rel","fyjl_edit"} ,{"mask","true"},{"target","dialog"},{"width","400"},{"height","400"},{"warn","请选择一条信息!"}
                    })
            </li>
            @*  <li>
                @Html.PermissionButton("CostLedger.List.Detail", "fysy_detail_Id",
                    Url.Action("CostLedgerView", "ScmCostLedger", new {id = "{ids}" }),
                    "查看",
                    new Dictionary<string, object>
                    {
                        {"class","detail"},{"rel","fysy_detail"} ,{"mask","true"},{"target","navTab"},{"warn","请选择一条信息!"}
                    })
            </li>
              <li>
                @Html.PermissionButton("CostLedger.List.Detail", "fysy_audit_Id",
                    Url.Action("CostLedgerAudit", "ScmCostLedger", new {id = "{ids}" }),
                    "审批",
                    new Dictionary<string, object>
                    {
                        {"class","check"},{"rel","fysy_audit"} ,{"mask","true"},{"target","navTab"},{"warn","请选择一条信息!"}
                    })
            </li>*@
        </ul>
    </div>
    <table class="table" width="100%" layouth="122" nowraptd="false">
        <thead>
            <tr>
                <th style="text-align: center;display:none" width="22">
                    <input type="checkbox" group="ids" class="checkboxCtrl">
                </th>
                <th style="text-align: center" width="30">
                    序号
                </th>
                <th style="text-align: center" width="100">
                    标段名称
                </th>
                <th style="text-align: center" width="110">
                    单位
                </th>
                <th style="text-align: center" width="110">
                    类型
                </th>
                <th style="text-align: center" width="110">
                    年份
                </th>
                <th style="text-align: center" width="80">
                    金额
                </th>
                <th style="text-align: center" width="70">
                    备注
                </th>
            </tr>
        </thead>
        <tbody>
            @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
            @foreach (var item in Model.TheCostLedgerList)
            {
                num += 1;
                <tr target="ids" rel="@item.Cl_ID">
                    <td style="text-align: center;display:none">
                        <input name="ids" value="@item.Cl_ID" type="checkbox">
                    </td>
                    <td style="text-align: center">@num
                    </td>
                    <td style="text-align: center">@item.Cl_SectionName
                    </td>
                    <td style="text-align: center">@item.Cl_ConstructionName
                    </td>
                    <td style="text-align: center">@(item.Cl_Type == true ? "罚款" : "奖励")
                    </td>
                    <td style="text-align: center">@item.Cl_YearMonth.ToString("yyyy年M月")
                    </td>
                    <td style="text-align: center">@item.Cl_Amount
                    </td>
                    <td style="text-align: center">@item.Cl_Remark
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <div class="panelBar" style="border-bottom:none;">
        <div class="pages" style="float: right">
            <span>显示</span>
            <select class="comsplitpage" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'tzgl_tzsb_list')">
                <option value="10" @(ViewBag.numPerPage == 10 ? "selected='selected'" : "")>10</option>
                <option value="20" @(ViewBag.numPerPage == 20 ? "selected='selected'" : "")>20</option>
                <option value="50" @(ViewBag.numPerPage == 50 ? "selected='selected'" : "")>50</option>
            </select>
            <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
        </div>
        <div class="pagination" style="margin:0px;float:left; margin-left:35%" rel="navTab" totalcount="@(ViewBag.totalcount)" numperpage="@(ViewBag.numPerPage)" pagenumshown="10" currentpage="@(ViewBag.pageNum)">
        </div>
    </div>
</div>
